package com.ddxz.demo.shiro.jwt.mapper;

import com.ddxz.demo.shiro.jwt.entity.UserEntity;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * interface description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/11/25
 */

@Mapper
@Repository
public interface ShiroMapper {
    String getPasswordByName(String username);

    List<String> getRoleByUserId(String username);

    List<String> getPermissionByRoleId(@Param("roleIds") List<String> roleIds);

    UserEntity getEntityByName(String username);

    Page<UserEntity> getUserList();

    Integer saveUser(@Param("ue") UserEntity entity);
}
